package leetcode.code0028;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution28 implements IDebug {

	public abstract int strStr(String haystack, String needle);

	@Override
	public void debug1() {
		String haystack = "hello";
		String needle = "ll";
		int e = 2;
		debug(haystack, needle, e);
	}

	private void debug(String haystack, String needle, int e) {
		int r = this.strStr(haystack, needle);
		HelpDebug.compare(e, r);

	}

	@Override
	public void debug2() {
		String haystack = "aaaaa";
		String needle = "bba";
		int e = -1;
		debug(haystack, needle, e);
	}

	@Override
	public void debug3() {
		String haystack = "";
		String needle = "";
		int e = 0;
		debug(haystack, needle, e);
	}

	@Override
	public void debug4() {
		String haystack = "a";
		String needle = "";
		int e = 0;
		debug(haystack, needle, e);
	}

}
